﻿package plugin.emailui
{
    import com.core.*;

    public class EmailControl extends Control
    {

        public function EmailControl(param1:Object)
        {
            super(param1);
            return;
        }// end function

        public function open() : void
        {
            return;
        }// end function

        public function close() : void
        {
            return;
        }// end function

        override public function update(param1:Obproxy, param2:ProxyChange) : void
        {
            if (param1.getName() == "email")
            {
                if (param2.property == "show")
                {
                    this.target.initShow(param2.newvalue);
                }
                else if (param2.property == "change")
                {
                    this.target.changeState(param2.newvalue);
                }
                else if (param2.property == "delete")
                {
                    this.target.deleteEmail(param2.newvalue);
                }
                else if (param2.property == "changemoney")
                {
                    this.target.changeMoney();
                }
                else if (param2.property == "addemail")
                {
                    this.target.addEmail(param2.newvalue);
                }
            }
            return;
        }// end function

    }
}
